package com.bafa.jdbc;

import java.util.HashMap;
import java.util.Iterator;

public class UpdateObject {

	
	private HashMap updateFields = new HashMap();
	private Iterator fieldNames = null;
	private Iterator fieldValues = null;
	public void addField(String fieldName, Object fieldValue){
		
		
		updateFields.put(fieldName,fieldValue);
		
		fieldNames = updateFields.keySet().iterator();
		fieldValues = updateFields.values().iterator();
		
		
	}
	
	public String nextField(){
		return (String)fieldNames.next();
	}
	
	public Object nextValue(){
		return fieldValues.next();
	}
	public boolean hasNext(){
		if(fieldValues==null)return false;
		return fieldValues.hasNext();
	}
}
